#pragma once
#ifdef MEDIA_PUSH_EXPORTS 
#define AUDIO_ACTION __declspec(dllexport) 
#else 
#define AUDIO_ACTION __declspec(dllimport) 
#endif 

#include <string>
class AudioCaptureInput;
class AudioEncodeTask; 
class Receive_handler;
class AUDIO_ACTION AudioAction
{
	friend class AsynchExecTask;
public:
	AudioAction(unsigned int bitrate = 64, unsigned int samplingrate = 44100);
	virtual ~AudioAction();
private:
	std::string  getAudioHeader();
	float		 getFrameDuration();
private:
	virtual bool OnInit(Receive_handler*);
	virtual bool OnStart();
	virtual bool OnStop();
private:
	unsigned int        m_oBitrate;
	unsigned int        m_oSamplingrate;
	AudioCaptureInput   *m_oAudioCaptureInput;
	AudioEncodeTask     *m_oAudioEncodeTask;
};

